package com.wuxianbei.wuxianbei.service.impl;

import com.wuxianbei.wuxianbei.mapper.TeamMapper;
import com.wuxianbei.wuxianbei.pojo.Team;
import com.wuxianbei.wuxianbei.service.TeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeamServiceImpl implements TeamService {

    @Autowired
    private TeamMapper teamMapper;

    public List<Team> all(){
        return teamMapper.all();
    }

    public void delete(String leaderNumber){
        teamMapper.delete(leaderNumber);
    }

    public void add(Team team){
        teamMapper.insert(team);
    }

    public List<Team> list(String leaderNumber){
        return teamMapper.list(leaderNumber);
    }

    public List<Team> searchByTopic(String val){
        return teamMapper.searchByTopic(val);
    }
    public List<Team> searchByTName(String val){
        return teamMapper.searchByTName(val);
    }
    public List<Team> searchByLeName(String val){
        return teamMapper.searchByLeName(val);
    }

    public List<Team> searchByLeNumber(String val){
        return teamMapper.searchByLeNumber(val);
    }

    public void topic(String leaderNumber, String topic){
        teamMapper.topic(leaderNumber,topic);
    }
}
